package com.ruoyi.system.domain.bo;

import com.ruoyi.common.core.validate.AddGroup;
import com.ruoyi.common.core.validate.EditGroup;
import com.ruoyi.system.anno.SnowflakeId;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.*;

import java.util.Date;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 采购申请单操作日志业务对象 pms_pr_operation_logs
 *
 * @author ruoyi
 * @date 2025-07-17
 */

@Data
@EqualsAndHashCode(callSuper = true)
public class PmsPrOperationLogsBo extends BaseEntity {

    /**
     * 日志ID
     */
    @NotNull(message = "日志ID不能为空", groups = { EditGroup.class })
    @SnowflakeId
    private Long logId;

    /**
     * 关联的采购申请单ID
     */
    @NotBlank(message = "关联的采购申请单ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long prId;

    /**
     * 操作类型：1-待提交,2-审批中,3-已批准,4-已拒绝,5-已关闭,6-已撤回
     */
    @NotBlank(message = "操作类型：1-待提交,2-审批中,3-已批准,4-已拒绝,5-已关闭,6-已撤回不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operationType;

    /**
     * 操作描述
     */
    @NotBlank(message = "操作描述不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operationDesc;

    /**
     * 操作人ID
     */
    @NotBlank(message = "操作人ID不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long operatorId;

    /**
     * 操作人姓名
     */
    @NotBlank(message = "操作人姓名不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operatorName;

    /**
     * 操作人角色
     */
    @NotBlank(message = "操作人角色不能为空", groups = { AddGroup.class, EditGroup.class })
    private String operatorRole;

    /**
     * 原状态(1-6对应主表状态)1-待提交,2-审批中,3-已批准,4-已拒绝,5-已关闭,6-已撤回
     */
    @NotBlank(message = "原状态(1-6对应主表状态)1-待提交,2-审批中,3-已批准,4-已拒绝,5-已关闭,6-已撤回不能为空", groups = { AddGroup.class, EditGroup.class })
    private String fromStatus;

    /**
     * 新状态(1-6对应主表状态)1-待提交,2-审批中,3-已批准,4-已拒绝,5-已关闭,6-已撤回
     */
    @NotBlank(message = "新状态(1-6对应主表状态)1-待提交,2-审批中,3-已批准,4-已拒绝,5-已关闭,6-已撤回不能为空", groups = { AddGroup.class, EditGroup.class })
    private String toStatus;

    /**
     * 上级状态日志id
     */
    @NotNull(message = "上级状态日志id不能为空", groups = { AddGroup.class, EditGroup.class })
    private Long parentLogId;


    /**
     * 操作时间
     */
    private Date createTime;

    private Long deptId;

}
